fix(proxy): recover goal restarts from unavailable owners - #1679
Open
leventov wants to merge 5 commits into
Open
fix(proxy): recover goal restarts from unavailable owners#1679leventov wants to merge 5 commits into
leventov wants to merge 5 commits into
Conversation
Permit an explicit, account-neutral Codex goal restart to retire an unchanged legacy owner only while its persisted account status is unavailable. Preserve fail-closed routing for all other continuity evidence and guard retirement with one compare-and-set tombstone.
leventov
force-pushed
the
fix/recover-restarted-conversation-affinity
branch
from
August 10, 2026 12:08
2412c6d to
a8e8199
Compare
15 tasks
Collaborator
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd554303b9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Codex conversation restart can resend a self-contained thread under the same
process-session identifier after its legacy owner exhausts quota. Raw legacy
codex_sessionrows are intentionally hard, so ordinary requests must failclosed; before this change, that same row also trapped an explicit,
self-contained goal restart on an unavailable account.
This PR adds one proof-gated direct-routing exception. A request may retire an
unavailable raw legacy owner only when it carries Codex's recognized
goal-continuation marker and its canonical upstream Responses payload is
account-neutral and self-contained. Retirement is compare-and-set,
policy-scoped, and request-owned. Ordinary, incremental, file-pinned,
conversation-bound, and unresolved-tool requests remain fail-closed.
HTTP bridge reuse/replacement is deliberately split into the dependent #1680.
No public wire format, setting, or default timeout changes. One nullable sticky-session column records source-qualified abandonment without backfilling historical rows.
Linked issue: none exists for this incident-derived defect; routed regression
coverage exercises the public Codex Responses and direct WebSocket paths.
Behavior and safety
request to the upstream Responses body.
owner is durably
PAUSED,RATE_LIMITED, orQUOTA_EXCEEDED.security-policy scope, computed before model and service-tier eligibility.
account as hard ownership for an equal explicit turn-state value.
change or recovery wins.
even when selection loaded a stale ACTIVE account snapshot.
only proxy-generated turn state when the restart changes accounts.
OpenSpec
openspec/changes/archive/2026-08-10-recover-restarted-conversation-affinity/.openspec/specs/sticky-session-operations/.stale-selection exclusion, and direct WebSocket state provenance.
Origin and concurrent work
Landed lineage:
b1d27bc6) introduced bounded stale hard-owner cleanup while keepinghot-path requests hard. This PR preserves that default and adds only a
proof-gated explicit-restart path.
201281b5) established the canonical account-neutral fresh-resendclassifier. This PR reuses that boundary rather than defining another movable
payload heuristic.
68397054) enforced ownership ofprevious_response_id; requests withthat anchor remain immovable here.
f2f8f916) and fix(proxy): recover dead durable bridge anchors fast #1625 (85f1ee4b) expanded bridge recovery anddead-owner handling. Their bridge lifecycle concerns are handled separately by
fix(http-bridge): preserve goal-restart recovery across reconnects #1680, not hidden in this object.
Concurrent work reviewed for overlap:
capability and must merge after this PR.
and direct-selection boundary; its overlap is documented in fix(http-bridge): preserve goal-restart recovery across reconnects #1680.
PR.
sticky-row retirement.
neither may reinterpret an ordinary hard session request as a restart.
Review findings addressed
Concrete review findings incorporated in this object:
the canonical upstream request body;
change, while client-supplied state remains hard;
authority.
Validation
Fresh current-head cloud CI is in progress after the object-level history split.
Screenshots / output
No dashboard-visible change.
Before:
After:
Simplicity
README section, or dashboard surface.
Checklist
source-provenance, model-authority, and migration regressions are included.
CHANGELOG.mdwas not edited.